#ifndef __jwy_MCF52259_UART_H_
#define __jwy_MCF52259_UART_H_

#include "MCF52259.h"

#define EnableInterrupts asm { move.w SR,D0; andi.l #0xF8FF,D0; move.w D0,SR;  }

#define wait 0
#define over 1

void uart_init(uint8 channel,int32 baudrate);

void uart0_putchar(const unsigned char c);
void uart0_putstr(const char *str);

void uart1_putchar(const char c);
void uart1_putstr(const char *str);

__declspec(interrupt) void UART0_interrupt(void);
__declspec(interrupt) void UART1_interrupt(void);

extern uint16 rest;
#endif